<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Admin</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="robots" content="all,follow">
    <link rel="stylesheet" href="../admin/vendor/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../admin/vendor/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../admin/css/fontastic.css">
    <link rel="stylesheet" href="../admin/css/style.default.css" id="theme-stylesheet">
    <link rel="stylesheet" href="../admin/css/custom.css">
    <link rel="stylesheet" href="../tools/layui/css/layui.css">
<body>
<div class="page">
    <div>
        <!--头部导航-->
        <div th:replace="admin/common/com-template::admin_topslide"/>
        <div class="page-content d-flex align-items-stretch">
            <!--左侧导航-->
            <!--左侧导航栏-->
            <nav class="side-navbar" th:fragment="admin_leftslide">
                <div th:replace="admin/common/com-template::admin_avatar"/>
                <!-- Sidebar Navidation Menus-->
                <span class="heading">Main</span>
                <ul class="list-unstyled">
                    <li><a href="/admin"> <i class="layui-icon icon-home"></i>主页 </a>
                    </li>
                    <li><a href="/admin/blog"> <i class="layui-icon layui-icon-template"></i>博客管理</a></li>
                    <li><a href="/admin/jumpBlog"> <i class="layui-icon layui-icon-release"></i>博客发布</a></li>
                    <li><a href="/admin/category"> <i class="layui-icon layui-icon-note"></i>分类管理</a></li>
                    <li class="active"><a href="/admin/label"> <i class="layui-icon layui-icon-note"></i>标签管理</a></li>
                    <li><a href="#exampledropdownDropdown" aria-expanded="false" data-toggle="collapse">
                        <i class="layui-icon layui-icon-user"></i>用户管理</a>
                        <ul id="exampledropdownDropdown" class="collapse list-unstyled">
                            <li><a href="#">用户列表</a></li>
                            <li><a href="#">授权</a></li>
                        </ul>
                    </li>
                </ul>
                <span class="heading">Extras</span>
                <ul class="list-unstyled">
                    <li><a href="#"> <i class="icon-picture"></i>首图管理</a></li>
                </ul>
            </nav>
            <!--内容-->
            <div class="content-inner">
                <div>
                    <!-- Page Header-->
                    <header class="page-header">
                        <div class="container-fluid">
                            <h2 class="no-margin-bottom">标签管理</h2>
                        </div>
                    </header>
                    <!--表单-->
                    <section class="tables" style="padding-top: 30px">
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-lg-12">
                                    <div class="card">
                                        <div class="card-close">
                                            <div class="dropdown">
                                                <button type="button" data-toggle="dropdown" aria-haspopup="true"
                                                        class="dropdown-toggle update-label ">
                                                    <i class="fa fa-gear"></i>添加
                                                </button>
                                            </div>
                                        </div>
                                        <div class="card-header d-flex align-items-center">
                                            <p>标签列表</p>
                                        </div>
                                        <div class="card-body">
                                            <div class="table-responsive">
                                                <!--表格数据-->
                                                <div class="table-responsive">
                                                    <!--简单表单-->
                                                    <div class="layui-form" style="display: none" id="labelForm">
                                                        <div class="container-fluid">
                                                            <div class="card-body">
                                                                <form class="layui-form" id="label-form">
                                                                    <div class="form-group" id="input_id">
                                                                        <label class="form-control-label">ID</label>
                                                                        <input type="number" disabled id="id" name="id"
                                                                               class="form-control">
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label class="form-control-label">标签</label>
                                                                        <input lay-verify="required"
                                                                               type="text" placeholder="请输入标签"
                                                                               class="form-control"
                                                                               id="name" name="name">
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <input type="submit" value="Save"
                                                                               class="btn btn-primary"
                                                                               lay-submit=""
                                                                               lay-filter="lay_labelyForm">
                                                                    </div>
                                                                </form>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <!--数据-->
                                                    <table class="table">
                                                        <thead>
                                                        <tr>
                                                            <th>#</th>
                                                            <th>分类</th>
                                                            <th>操作</th>
                                                        </tr>
                                                        </thead>

                                                        <tbody>
                                                        <tr th:each="label,index:${labelList}"
                                                            th:if="${labelList!=null}">
                                                            <th scope="row" th:text="${index.count}">1</th>
                                                            <td th:text="${label.name}">Mark</td>
                                                            <td>
                                                                <button class="btn small btn-primary update-label"
                                                                        th:postId="${label.id}" type="button">修改
                                                                </button>
                                                                <button class="btn small btn-danger delete-label"
                                                                        th:postId="${label.id}" type="button">删除
                                                                </button>
                                                            </td>
                                                        </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>

                    <!-- Page Footer-->
                    <div th:replace="admin/common/com-template::admin_footer"/>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../admin/vendor/jquery/jquery.min.js"></script>
<script src="../admin/vendor/popper.js/umd/popper.min.js"></script>
<script src="../admin/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="../admin/vendor/jquery.cookie/jquery.cookie.js"></script>
<script src="../admin/vendor/jquery.cookie/jquery.cookie.js"></script>
<script src="../tools/layui/layui.js"></script>
<script src="../../admin/js/html5shiv.min.js"></script>
<script src="../../admin/js/respond.min.js"></script>
</head>

<!--控制-->
<script src="../admin/controller.js"></script>
</body>
</html>